package com.wx.model;

import java.util.List;

import com.wx.core.process.message.model.Kfonline;
import com.wx.util.cache.Cache;
import com.wx.util.cache.LFUCache;
import com.wx.util.cache.LRUCache;

public class CacheTmp {
	
	/**
	 * 在线客服接口缓存
	 */
	public static Cache<String,List<Kfonline>> KFONLINECACHE = new LFUCache<String,List<Kfonline>>(0, 10*60*1000,0);
	
	/**已发送红包缓存名单*/
	public static Cache<String,String> SENDHONGBAOCACHE = new LRUCache<String,String>(0, 66*1000,0);
	
	/**消息缓存名单*/
	public static Cache<String,String> MSGREQ = new LRUCache<String,String>(0, 2*1000,0);
	
	
	/**
	 * 
	 * @param openId
	 * @return key
	 */
	public static String hongbaoSendCache(String openId){
		return "cache:hongbao:"+openId;
	}
	
	public static String getGgkKey(Integer id,String openid){
		return "ggk:"+id+":"+openid;
	}
	
	/**
	 * 水果机
	 * <blockquote>
	 * <pre>
	 * 
	 * </pre>
	 * </blockquote>
	 * @param id
	 * @param openid
	 * @return
	 */
	public static String getLuckyfruitKey(Long id,Long wxUserId){
		return "luckyfruit:"+id+":"+wxUserId;
	}
	
	/**
	 * 奖品缓存
	 * <blockquote>
	 * <pre>
	 * 
	 * </pre>
	 * </blockquote>
	 * @param atitleId
	 * @return
	 */
	public static String getWxActiveGiftPoolKey(String wxid){
		return "WxActiveGiftPool:"+wxid;
	}

	public static String getWxLuckyfruitList(String wxid) {
		return "WxLuckyfruitList:"+wxid;
	}
	
	/**
	 * <blockquote>
	 * <pre>
	 * 
	 * </pre>
	 * </blockquote>
	 * @return
	 * @throws Exception 
	 */
	public static String hongbaoCache(Long hongbaoNum){
		return "hongbao:"+Long.toString(hongbaoNum);
	}
	
}
